package scu.util.filter;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;


public class EncodingFilter implements Filter{
	private FilterConfig config;
	@Override
	public void init(FilterConfig config) {
		this.config = config;
	}
	
	@Override
	public void destroy() {
		this.config = null;
	}
	
	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) 
						throws IOException, ServletException {
		request.setCharacterEncoding("gb18030");
		chain.doFilter(request, response);
	}
	
}
